package com.qijian.common.config;


import com.qijian.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;


@Component
public class EmailConfig {

    @Value("${email.allowSuffix:''}")
    private String mailAllowSuffixList;

    private List<String> allowSuffixList;


    public List<String> getAllowSuffixList() {
        if (StringUtils.isEmpty(mailAllowSuffixList)) {
            return null;
        }

        return Arrays.asList(mailAllowSuffixList.split(","));
    }

}
